<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>HỆ THỐNG QUẢN LÝ MBA</title>
        <link href="style_index.css" rel="stylesheet" type="text/css" />
    </head>
    <?php
    if (isset($_GET['content'])) {
        $content = $_GET['content'];
    } else {
        $content = 'qldv';
    }
    include "configs/dbconnect.php";
    ?>
    <?php if (isset($_SESSION['userinfo'])) { ?>
        <body topmargin="0">
            <table width="1024px" border="0" cellpadding="0" cellspacing="0" align="center" class="wrapper">
                <tr>
                    <td>
                        <table align="center" cellspacing="0" cellpadding="0"  width="100%" class="table_index">
                            <tr>
                                <td colspan="3" class="banner" valign="top">
                                    <!--------------------------------------->
                                    <table width="350px" align="right" cellpadding="0" cellspacing="0" class="chao">
                                        <tr>
                                            <td style="border-right: 1px dashed #121212;">
                                                Xin chào, <?php echo $_SESSION['userinfo']['MA_DON_VI']; ?></td>
                                            <td><a href="logout.php">Thoát</a></td>
                                        </tr>
                                    </table>
                                    <!--------------------------------------->
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3"><?php include "menu.php"; ?></td>
                            </tr>
                            <tr>
                                <td colspan="3">

                                </td>
                            </tr>
                            <tr>
                                <td colspan="3" height="500px">
                                    <?php
                                    switch ($content) {
                                        case 'qldv':include "views/CapNhatDonVi.php";
                                            break;
                                        case 'themdv':include "views/FormThemDonVi.php";
                                            break;
                                        case 'qlmba':include "views/FormThemMBA.php";
                                            break;
                                        case 'import':include "views/test_import_excel2.php";
                                            break;
                                        case 'search':include "timnangcao.php";
                                            break;
                                        case '':include "";
                                            break;
                                        case '':include "";
                                            break;
                                        case '':include "";
                                            break;
                                    }
                                    ?>
                                </td>
                            </tr>
                            <tr> 
                                <td colspan="3"><?php include "footer.php"; ?></td>
                            </tr>
                        </table>
                    </td>

                </tr>
            </table>
        </body>
        <?php
    } else {
        include 'login.php';
    }
    ?>    
</html>

